package controllers

import (
	"github.com/astaxie/beego"
)

type TriggerHeartbeatreadController struct {
	beego.Controller
}

func (c *TriggerHeartbeatreadController) RetCveData(resp map[string]interface{}) {
	c.Data["json"] = resp
	c.ServeJSON()
}

// @Title Heartbeatreadiness
// @Description Heartbeatreadiness
// @Param body body models.Heartbeatreadiness true
// @Success 200 {int} models.Id
// @Failure 403 body is empty
// @router / [get]
func (u *TriggerHeartbeatreadController) Get() {
	resp := make(map[string]interface{})
	resp["code"] = "200"
	resp["errmsg"] = "success"
	resp["body"] = "success"
	defer u.RetCveData(resp)
}

type TriggerHeartbeatLiveController struct {
	beego.Controller
}

func (c *TriggerHeartbeatLiveController) RetCveData(resp map[string]interface{}) {
	c.Data["json"] = resp
	c.ServeJSON()
}

// @Title HeartbeatLive check
// @Description get HeartbeatLive
// @Param	body body models.Heartbeatreadiness true
// @Success 200 {int}
// @Failure 403 :status is err
// @router / [get]
func (u *TriggerHeartbeatLiveController) Get() {
	resp := make(map[string]interface{})
	resp["code"] = "200"
	resp["errmsg"] = "success"
	resp["body"] = "success"
	defer u.RetCveData(resp)
}
